This Rmd will prepare temperature data for inclusion in the model. Much of the code is borrowed from 20_covariate_data.Rmd, but is trimmed down to only what is needed to generate a gap-less temperature dataset.
There is a considerable amount of missing temperature data. To interpolate missing values, we will use the following protocol to determine where temperature data is drawn from:
Throughout all of this, we will make sure to record how each temperature data point was generated for QA/QC purposes.
Here, we will distinguish between forebay (“f”) and tailrace (“t”) temperature at each dam
there are some complete nonsense values that it looks like we will
have to filter. Worst offenders are RIS, RRE, and WEL. Is it the forebay
or tailrace temperatures that are bad? Turns out both
Two steps: 1. For total nonsense runs of values (RIS, RRE, and WEL) -
manually select and drop those days 2. Drop outliers - see chunk below
For outliers: Any values that are +/- 4 degrees away from the long-term mean for that day will be dropped